package com.test.controller;

import com.test.service.OrderMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController()
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderMemberService orderMemberService;

    @RequestMapping(value = "/member", method = RequestMethod.GET)
    public List<String> getOrderUserAll() {
        System.out.println("订单服务开始调用会员服务");
        return orderMemberService.getOrderUserAll();

    }

    @RequestMapping(value = "/api", method = RequestMethod.GET)
    public String getApi() {
        return "order-api";
    }
}
